<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	 <span class="color_red">*</span>2. 主要论文专著目录
</div>

<table  id="tabPaper" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;">
			<col width="4%" />
			<col width="4%" />
			<col width="22%" />
			<col width="10%" />
			<col width="10%" />
			<col width="8%" />
			<col width="8%" />
			<col width="12%" />
			<col width="8%" />
			<col width="8%" />
			<col width="8%" />
			<thead >
				<tr style="border:1px solid #B7D1E6">
					<th class="TblHead" align="center" >选择</th>
					<th class="TblHead" align="center" >序号</th>
					<th class="TblHead" align="center" >论文专著名称</th>
					<th class="TblHead" align="center" >刊名</th>
					<th class="TblHead" align="center" >通讯作者</th>
					<th class="TblHead" align="center" >候选人作者排名</th>
					<th class="TblHead" align="center" >年卷页码（xx年xx卷xx页）</th> 
					<th class="TblHead" align="center" >发表时间</th>
					<th class="TblHead" align="center" >影响因子</th>
					<th class="TblHead" align="center" >SCI他引次数</th>
					<th class="TblHead" align="center" >他引总次数</th> 
				</tr>
			</thead>
			<tbody id="tab">
			<input type="hidden" id="nowDate" value="${sercverSysDate1}" label="当前日期"/>
					<tr style="display:none"  align="center">
						<td align="center">
							<input type="radio" class="radiobutton" name="selmainpsn"  >
						</td>
						<td align="center">
							<span name="mainpaper|list[0]@seq_no" >[index]</span> 
						</td>
						<td align="center">
							<input type="text" id="mainpaper[0]" name="mainpaper|list[0]|paper_name" label="论文专著名称"  maxlength="200" style="width:80%" class="required input_text"/>
						</td>
						<td align="center">
							<input type="text" name="mainpaper|list[0]|paper" label="刊名"  maxlength="100" style="width:80%" class="required input_text"/>
						</td>
						<td align="center">
							<input type="text" name="mainpaper|list[0]|paper_author" label="通讯作者"  maxlength="50" style="width:80%" class="required input_text"/>
						</td>
						<td align="center">
							<input type="text" name="mainpaper|list[0]|candidate_author" label="候选人作者排名"  maxlength="10" style="width:80%" class="required input_text"/>
						</td>
						<td align="center">						
							<input type="text" name="mainpaper|list[0]|paper_no" label="年卷页码（xx年xx卷xx页）"  maxlength="100" style="width:80%" class="required input_text"/>
						</td>
						<td align="center">						
			          	<input id="publish_date_[0]" name="mainpaper|list[0]|publish_date"  class=" required date  dateCompare:nowDate" label="发表时间"  style="width:60%"/>
						</td>
						<td align="center">		
							<input type="text" name="mainpaper|list[0]|affect_factor" label="影响因子"  onfocus="InitInput.setNumber(this,7,2,2)" maxlength="50" style="text-align: right;width:80%" class="  input_text"/>
						</td>
						<td align="center">
							<input type="text" name="mainpaper|list[0]|sci_no"  onchange="countTableInt('tabPaper','sci2_total','7');" label="SCI他引次数"  onfocus="InitInput.setNumber(this,7,0,0)" maxlength="50" style="text-align: right; width:80%" class="required input_text"/>
						</td>
						<td align="center">
							<input type="text" name="mainpaper|list[0]|total_no"  onchange="countTableInt('tabPaper','others2_total','8');" label="他引总次数"  onfocus="InitInput.setNumber(this,7,0,0)" maxlength="50" style="text-align: right; width:80%" class="required input_text"/>
						</td>
					</tr>
					 <c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/mainpaper/list" var="list">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr   align="center">
						<td>
							<input type="radio" class="radiobutton" name="selmainpsn"  >
						</td>
						<td align="center">
							<span   name="mainpaper/list[${flag}${index}]@seq_no" >${index+1}</span> 
						</td>
						<td align="center">
						   <input type="text" id="mainpaper[${flag}${index}]" name="mainpaper/list[${flag}${index}]/paper_name"   label="论文专著名称"   style="width:80%" maxlength="200"  class="required input_text" value="<x:out select="$list/paper_name" />"/>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/paper"   label="刊名"   style="width:80%" maxlength="100"  class="required input_text" value="<x:out select="$list/paper" />"/>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/paper_author"   label="通讯作者"   style="width:80%" maxlength="50"  class="required input_text" value="<x:out select="$list/paper_author" />"/>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/candidate_author"   label="候选人作者排名"   style="width:80%" maxlength="10"  class="required input_text" value="<x:out select="$list/candidate_author" />"/>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/paper_no"   label="年卷页码（xx年xx卷xx页）"   style="width:80%" maxlength="100"  class="required input_text" value="<x:out select="$list/paper_no" />"/>
						</td>
						<td align="center">
						   <c:set var="publish_date" scope="page"><x:out select="$list/publish_date"/></c:set>
							<cpt:date id="publish_date" name="mainpaper/list[${flag}${index}]/publish_date" value="${publish_date}" className=" required date  dateCompare:nowDate" label="发表时间"  size="8"></cpt:date>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/affect_factor"   label="影响因子"  onfocus="InitInput.setNumber(this,7,2,2)"  style="text-align: right;width:80%" maxlength="50"  class="  input_text" value="<x:out select="$list/affect_factor" />"/>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/sci_no"  onchange="countTableInt('tabPaper','sci2_total','7');" onfocus="InitInput.setNumber(this,7,0,0)"  label="SCI他引次数"   style="text-align: right; width:80%" maxlength="50"  class="required input_text" value="<x:out select="$list/sci_no" />"/>
						</td>
						<td align="center">
						   <input type="text" name="mainpaper/list[${flag}${index}]/total_no"  onchange="countTableInt('tabPaper','others2_total','8');" onfocus="InitInput.setNumber(this,7,0,0)"  label="他引总次数"   style="text-align: right; width:80%" maxlength="50"  class="required input_text" value="<x:out select="$list/total_no" />"/>
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
				<script type="text/javascript">
						showAllDateTag("tabPaper");
				</script> 
				</table>
				<%-- <table cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;table-layout:fixed;">
					<col width="4%" />
					<col width="4%" />
					<col width="22%" />
					<col width="10%" />
					<col width="10%" />
					<col width="10%" />
					<col width="10%" />
					<col width="10%" />
					<col width="10%" />
					<col width="10%" />
				<tr>
					<td align="center" colspan="7">合  计</td>
					<td align="center">
					   <input type="text" name="mainpaper/sci2_total" id="sci2_total" onfocus="InitInput.setNumber(this,7,0,0)"  label="他引总次数"   style="text-align: right; width:80%" maxlength="50" disabled class="gray input_text" value="<x:out select="$xmlData/data/mainpaper/sci2_total" />"/>
					</td>
					<td align="center">
					   <input type="text" name="mainpaper/others2_total" id="others2_total" onfocus="InitInput.setNumber(this,7,0,0)"  label="他引总次数"   style="text-align: right; width:80%" maxlength="50" disabled class="gray input_text" value="<x:out select="$xmlData/data/mainpaper/others2_total" />"/>
					</td>
					<td></td>
				</tr>
				 </table> --%>
				  
					<table width="98%" align="center">
					<tr><td>
					<input class="button"  name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tabPaper',200,'主要论文专著目录只能填写200篇')){addNewRow('tabPaper');showDateTag('tabPaper');}try{top.resizeFrame();}catch(e){};">
					<input class="button"  name="cmdMovePrev" type=button value="上移" onclick="movePrev('tabPaper','selmainpsn')">
					<input class="button"  name="cmdMoveNext" type=button value="下移" onclick="moveNext('tabPaper','selmainpsn')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tabPaper','主要论文专著目录');countTableInt('tabPaper','sci2_total','7');countTableInt('tabPaper','others2_total','8');">
					</td></tr>
	</table>

	<script type="text/javascript">
	/**
	* 选择树设置隐藏域值 public.js中原函数不适用，针对treeId中包含下标的情况
	*/
	function initTreeValueExt(treeId, treeNode) {

		var inputId = treeId.substring(0, treeId.lastIndexOf('_'));
		if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find("[name$='" + inputId + "_code'],[id$='" + inputId+ "_code']").val("");
				$("#" + treeId).parents("td").find("[name$='" + inputId + "_value'],[id$='" + inputId+ "_value']").val("");
				$("#" + treeId).parents("td").find("[name$='" + inputId + "_name'],[id$='" + inputId+ "_name']").val("");
			}
			return false;
			}
			var str = treeNode.name;
			var obj = treeNode.parentNode;
			while (obj != null) {
				//str = obj.name + "-" + str;
				obj = obj.parentNode;
			}
			$("#" + treeId).parents("td").find("[name$='" + inputId + "_code'],[id$='" + inputId+ "_code']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + inputId + "_value'],[id$='" + inputId+ "_value']").val(treeNode.id);
			$("#" + treeId).parents("td").find("[name$='" + inputId + "_name'],[id$='" + inputId+ "_name']").val(str);
		}
	
	
	</script>
	